<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">

<title>document.activeElement</title>
<style type="text/css">

body	{
	border: 1px solid #000;
	width: 450px;
}

#show	{
	height: 50px;
}

</style>
<script type="text/javascript" src="document_activeElement.js"></script>
<script type="text/javascript">

setInterval(function()
{
	if ( ! document.activeElement ) {
		return;
	}

	document.getElementById('show').innerHTML = document.activeElement.tagName;
}, 100);

</script>
</head>

<body>

<div id="show"></div>

<hr />

<p>sample text within paragraph</p>

<form method="get" action="http://localhost">
<input type="text" value="text" />
<textarea>random</textarea>
<select>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<input type="submit" value="go!" />
</form>

<form method="get" action="http://localhost">
<input type="text" value="another" />
<textarea>another textarea</textarea>
<input type="submit" value="check!" />
</form>

</body>
</html>

